<?php /* Smarty version Smarty 3.1.4, created on 2012-05-05 13:05:41
         compiled from ".\templates\product\index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:43094f9fc71b49f834-79976832%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'dd31e4cb087ccbb2104ac83b2c3ed911b9dd1ccf' => 
    array (
      0 => '.\\templates\\product\\index.tpl',
      1 => 1336223135,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '43094f9fc71b49f834-79976832',
  'function' => 
  array (
  ),
  'version' => 'Smarty 3.1.4',
  'unifunc' => 'content_4f9fc71b4ef94',
  'variables' => 
  array (
    'cat_arr' => 0,
    'select' => 0,
    'subcat_arr' => 0,
    'searchkey' => 0,
    'item_arr' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_4f9fc71b4ef94')) {function content_4f9fc71b4ef94($_smarty_tpl) {?> <script>

 $(function() {
  $( "#tabs" ).tabs();
                //$("#tabs").tabs('load',current_index);
 });


             $(function(){

             $('#producttable').dataTable({
                "bJQueryUI": true,
                "sPaginationType": "full_numbers",
                  "bStateSave": true,
                  "iCookieDuration":120,
                  "aaSorting": [[ 0, "desc" ]]

   } );
} );
</script>
<table>
        <tr>
            <td> <img src="images/icons/add.png"><a onclick="loadPage('product/addproduct/101000100001');" href="javascript: void(0)">Add New</a></td>
            <td> <img src="images/icons/search.gif"><a onclick="updatesearchstr()" href="javascript: void(0)">Update Search string</a></td>
           <td>&nbsp;&nbsp;&nbsp;</td>
           <td>Category</td>
		
               	<td><select name="category" id="category" onchange="loadPage('product/index/cat-'+this.value);">
		<option value="">Select Category</option>
		<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['sec2'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['name'] = 'sec2';
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['cat_arr']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['sec2']['total']);
?>
		
		<option value="<?php echo $_smarty_tpl->tpl_vars['cat_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec2']['index']]['cat_id'];?>
" <?php echo $_smarty_tpl->tpl_vars['select']->value;?>
><?php echo $_smarty_tpl->tpl_vars['cat_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec2']['index']]['cat_desc'];?>
</option>
		<?php endfor; endif; ?>
		</select>
		</td>   
                
	        <td>&nbsp;&nbsp;&nbsp;</td>
		<td>Sub Category</td>
		<td>
			<div id="subcat_loader">
				<select name="subcat" id="subcat" onchange="loadPage('product/index/subcat-'+this.value)">
				<option value="">Sub Category</option>
                                <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['sec3'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['name'] = 'sec3';
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['subcat_arr']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['sec3']['total']);
?>
                                
                                <option value="<?php echo $_smarty_tpl->tpl_vars['subcat_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec3']['index']]['cat_id'];?>
" <?php echo $_smarty_tpl->tpl_vars['select']->value;?>
><?php echo $_smarty_tpl->tpl_vars['subcat_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec3']['index']]['cat_desc'];?>
</option>
                                <?php endfor; endif; ?>
				</select>
                        			</div></td>
                        <td>&nbsp;&nbsp;&nbsp;</td>
                        <td><input   value="<?php echo $_smarty_tpl->tpl_vars['searchkey']->value;?>
"   type="text" id="searchkey" name="searchkey">
                            <input type="button" onclick="filterbykey()" value="Go">
                        </td>
                        
             <td>&nbsp;</td>
             <td><a href="javascript: void(0);" onclick="loadPage('product/homepageproduct/')">Home Page Products</a></td>

	</tr>
        <tr><td>&nbsp;</td></tr>
        </table>

</div>
                        
                        
                        
</tr>
<div align="center">
	<table border="0" width="100%" cellpadding="0" cellspacing="0" class="display" id="producttable">
            <thead>
		<tr>
			<th width="5%" align="center" class="table-header-repeat">Code</th>
                        <th width="5%" align="center" class="table-header-repeat">Item Code</th>
			<th width="20%" align="center" class="table-header-repeat line-left">Product Title</th>
			<th width="5%" class="table-header-repeat line-left">Price</th>
			
			<th width="9%" class="table-header-repeat line-left">Category</th>
			<th width="9%" class="table-header-repeat line-left">Sub Category</th>
			<th width="3%" class="table-header-repeat line-left">Clicks</th>
			<th width="3%" class="table-header-repeat line-left">Status</th>
			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>
			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>
                        <th width="2%" class="table-header-repeat line-left">&nbsp;</th>
                        <th width="2%" class="table-header-repeat line-left">&nbsp;</th>
		</tr>
                </thead>
                <tbody>
		<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['name'] = 'sec1';
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['item_arr']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total']);
?>
		<tr>
			<td><?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['id'];?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['add_id'];?>
</td>
			<td><?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['title'];?>
</td>
			<td><?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['addamount'];?>
</td>
			
			<td><?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['catid'];?>
</td>
			<td><?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['subcatid'];?>
</td>
			<td><?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['user_clicks'];?>
</td>
			<td><?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['status'];?>
</td>
                       
                       
			<td><a href="javascript: void(0);" onclick="loadPage('product/editproduct/<?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['add_id'];?>
');"><img src="images/icons/edit.gif" width="15" height="15" /></a></td>
			<td><a href="javascript: void(0);" onclick="loadPage('product/addimage/<?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['add_id'];?>
');"><img src="images/icons/imgpreview.png" width="20" height="20" /></a></td>
                        <td><a href="javascript: void(0);" onclick="loadPage('product/addfeatures/<?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['add_id'];?>
');"><img src="images/icons/settings.gif" width="20" height="20" /></a></td>
		        <td><a href="javascript: void(0);" onclick="deleteproduct(<?php echo $_smarty_tpl->tpl_vars['item_arr']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['add_id'];?>
);"><img src="images/icons/a-minus.gif" /></a></td>
                </tr>
		<?php endfor; endif; ?>
            </tbody>
	</table>
	 
</div>
<script type="text/javascript">
    function filterbykey()
    {
        var searckkey= $("#searchkey").val();
        var catid= $("#category").val();
        var subcat= $("#subcat").val();
       // alert('product/index/searchkey-'+searckkey);
        loadPage('product/index/searchkey-'+searckkey+'-'+catid+'-'+subcat);

    }
</script><?php }} ?>